/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

/// Omen Headers
#include "OmenConfig.h"
#include <OmenProperty.h>

// STL Headers
#include <map>
#include <string>
#include <vector>

namespace Omen
{
    class OMEN_API PropertyObject
    {
    public:
        PropertyObject() {};
        PropertyObject( const std::wstring& propertyObjectName );                                        /// <summary>Creates a new Omen::PropertyObject</summary>
        PropertyObject( const PropertyObject& other );                                                    /// <summary>Copy constructor</summary>
        virtual ~PropertyObject();

        void setProperty( const std::wstring& strPropertyName, const std::wstring& strPropertyValue );    /// <summary>Adds a new property to the object</summary>
        Omen::Property& property( const std::wstring& strPropertyName );                                /// <summary>Returns the value of given property</summary>


        bool hasProperty( const std::wstring& strPropertyName ) const;                                    /// <summary>Returns true if object has a property with given name, false otherwise</summary>
        
        void getPropertyNames( std::vector<std::wstring>& listPropertyNames ) const;                    /// <summary>Returns a vector of property names added to the object</summary>

        bool operator == (const std::wstring& strPropertyObjectName) const;
        bool operator == (const PropertyObject& other) const;
        bool operator < ( const Omen::PropertyObject& other ) const;

    protected:
    private:
        #pragma warning(disable:4251) // Disable warning about private member variable needs to have dll-interface to be used by clients of class 'this'
        std::wstring                                    m_name;
        std::map< std::wstring, Omen::Property >        m_properties;
        #pragma warning(default:4251)
    };
} /// ~namespace Omen

/// EOF